package io.e4x.example.jnidemo;

import com.sun.jna.Callback;
import com.sun.jna.DefaultTypeMapper;
import com.sun.jna.Library;
import com.sun.jna.Native;
import com.sun.jna.ptr.ByteByReference;

public interface FudxCall extends Library {

    DefaultTypeMapper typeMapper = new DefaultTypeMapper();

    FudxCall instance=(FudxCall) Native.load("fudxCall", FudxCall.class);
    public interface OnConnectedListener extends Callback {
        void invoke(int stat);
    }
    public interface OnStreamReadListener extends Callback {
        void invoke(ByteByReference data, int len, int type);
    }
    void delegate(OnConnectedListener connListener, OnStreamReadListener streamReadListener);
    void registServer(String server, int port, String name);
    void connectDevice(String name);
}
